program main
      implicit none
      real income,tax
      write(*,"(a7)") "Income:"
      read(*,*) income
      if(income<1000.0)then
          tax = income*0.03     ! ~1000
      else if(income<=5000.0)then
          tax = (income - 1000.0)*0.1+1000.0*0.03       ! 1000~5000
      else
          tax = (income - 5000.0)*0.15 + 1000.0*0.03 + 4000.0*0.1   ! 5000~
      end if
      write(*,"(a4,f9.2)") "Tax:",tax
end program
